The sum of the first $n$ terms in the infinite geometric sequence $\left\{\frac{1}{4},\frac{1}{8},\frac{1}{16},\dots \right\}$ is $\frac{63}{128}$. Find $n$.
This is a geometric sequence with first term $\frac{1}{4}$ and common ratio $\frac{1}{2}$. Thus the sum of the first $n$ terms is:

$\frac{63}{128}=\frac{1}{4}\left(\frac{1-\left(\frac{1}{2}\right)^n}{1-\frac{1}{2}}\right)=\frac{2^n-1}{2^{n+1}}$.

We see that $\frac{63}{128}=\frac{2^6-1}{2^7}$, so $n=\boxed{6}$.